import pandas as pd
from flask import Flask, render_template

df = pd.read_csv('data/中国疫情.csv')
df = df.sort_values('累计', ascending=False).head(2)
province = df['地区'].tolist()
col = df.columns.tolist()[2:]
data = df.iloc[:, 2:].values.tolist()



app = Flask(__name__)


@app.route("/")
def index():
    return render_template('疫情累计感染最多的两个省份信息雷达图.html', province=province, col=col, data=data)


if __name__ == '__main__':
    app.run(debug=True)
